package com.osdp.simple.routes;

//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.cloud.gateway.route.RouteLocator;
//import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;


//@Configuration(proxyBeanMethods = false)
public class AdditionalRoutes{
	/*@Value("${test.uri:http://httpbin.org:80}")
	String url = null;
	@Bean
	public RouteLocator myRoutes(RouteLocatorBuilder builder) {
	   return builder.routes()
	    .route("test-kotlin",p -> p
	    	.host("kotlin.abc.org").and()
	        .path("/image/png")
	        .filters(f -> f.prefixPath("/httpbin").addRequestParameter("X-TestHeader", "foobar"))
	        .uri(url))
	    .build();
	}*/
}

/**
@Configuration(proxyBeanMethods = false)
open class AdditionalRoutes {

    @Value("\${test.uri:http://httpbin.org:80}")
    var uri: String? = null

    @Bean
    open fun additionalRouteLocator(builder: RouteLocatorBuilder) = builder.routes {
        route(id = "test-kotlin") {
            host("kotlin.abc.org") and path("/image/png")
            filters {
                prefixPath("/httpbin")
                addResponseHeader("X-TestHeader", "foobar")
            }
            uri(uri)
        }
    }
}
*/